﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NormalMasterPage.master" AutoEventWireup="true" CodeBehind="Configuration.aspx.cs" Inherits="Irendil.Configuration" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register src="controls/insertBar.ascx" tagname="insertBar" tagprefix="ucInsertBar" %>
<asp:Content ID="Content" ContentPlaceHolderID="NormalContentPlaceHolder" runat="server">
    
    <ucInsertBar:insertBar ID="insertBar" runat="server" />

    <asp:GridView ID="serverConfigGridView" runat="server" CssClass="GridView_Grid" 
        GridLines="None" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource" 
        onrowcommand="serverConfigGridView_RowCommand" DataKeyNames="Guid" >
        <AlternatingRowStyle CssClass="GridView_AlternatingRowStyle" />
        <Columns>
            <asp:CommandField ShowEditButton="True" ShowDeleteButton="True" />
            <asp:TemplateField HeaderText="GUID" Visible="true" ControlStyle-Width="10px">
                <EditItemTemplate>
                    <asp:HiddenField ID="guidHiddenField" runat="server" Value='<%# Bind("GUID") %>' />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Button ID="saveButton" CommandName="saveButton" runat="server" Text="Salva" CssClass="Button" />
                </FooterTemplate>
                <ItemTemplate>
                    <asp:HiddenField ID="guidHiddenField" runat="server" Value='<%# Bind("GUID") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Installazione" ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:Label ID="domainNameLabel" runat="server" Text='<%# Eval("domainName") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:Button ID="undoButton" CommandName="undoButton" runat="server" Text="Annulla" CssClass="Button" OnClick="undoButton_Click" CausesValidation="False" />
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="domainNameLabel" runat="server" Text='<%# Bind("domainName") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Host" ControlStyle-Width="100px">
                <EditItemTemplate>
                    <asp:TextBox ID="hostTextBox" runat="server" Text='<%# Bind("Host") %>' CssClass="inputNormal"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="hostRequiredFieldValidator" runat="server" ControlToValidate="hostTextBox" ErrorMessage="Inserire host" Display="Dynamic"></asp:RequiredFieldValidator>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="hostTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="hostRequiredFieldValidator" runat="server" ControlToValidate="hostTextBox" ErrorMessage="Inserire host" Display="Dynamic"></asp:RequiredFieldValidator>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="hostLabel" runat="server" Text='<%# Bind("Host") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Descrizione host" ControlStyle-Width="100px">
                <EditItemTemplate>
                    <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("Description") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="descriptionTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="descriptionLabel" runat="server" Text='<%# Bind("Description") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ospedale"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:DropDownList ID="hospitalsDropDownList" runat="server" 
                        DataSourceID="hospitalsObjectDataSource" DataTextField="description" 
                        DataValueField="GUID" SelectedValue='<%# Bind("GUIDHospital") %>' 
                        CssClass="ddmBox">
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="hospitalsObjectDataSource" runat="server" 
                        SelectMethod="getAllHospitalsForInstallation" 
                        TypeName="IrendilDLL.PageControls.ConfigurationControl"></asp:ObjectDataSource>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:DropDownList ID="hospitalsFooterDropDownList" runat="server" 
                        DataSourceID="hospitalsFooterObjectDataSource" DataTextField="description" 
                        DataValueField="GUID" CssClass="ddmBox">
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="hospitalsFooterObjectDataSource" runat="server" 
                        SelectMethod="getAllHospitalsForInstallation" 
                        TypeName="IrendilDLL.PageControls.ConfigurationControl"></asp:ObjectDataSource>
                </FooterTemplate>
                <ItemTemplate>
                        <asp:Label ID="hospitalsLabel" runat="server" Text='<%# Bind("descriptionHospital") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>  
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tipo host"  ControlStyle-Width="100px">
                <EditItemTemplate>
                    <asp:DropDownList ID="hostTypesDropDownList" runat="server" 
                        DataSourceID="hostTypesObjectDataSource" DataTextField="HostType" 
                        DataValueField="GUID" SelectedValue='<%# Bind("GUIDHostType") %>' 
                        CssClass="ddmBox">
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="hostTypesObjectDataSource" runat="server" 
                        SelectMethod="getAllHostTypes" 
                        TypeName="IrendilDLL.PageControls.ConfigurationControl"></asp:ObjectDataSource>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:DropDownList ID="hostTypesFooterDropDownList" runat="server" 
                        DataSourceID="hostTypesFooterObjectDataSource" DataTextField="HostType" 
                        DataValueField="GUID" CssClass="ddmBox">
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="hostTypesFooterObjectDataSource" runat="server" 
                        SelectMethod="getAllHostTypes" 
                        TypeName="IrendilDLL.PageControls.ConfigurationControl"></asp:ObjectDataSource>
                </FooterTemplate>
                <ItemTemplate>
                <asp:Label ID="hostTypesLabel" runat="server" Text='<%# Bind("HostType") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>   
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Provider"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="providerTextBox" runat="server" Text='<%# Bind("Provider") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="providerTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="providerLabel" runat="server" Text='<%# Bind("Provider") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="AET"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="aetTextBox" runat="server" Text='<%# Bind("AET") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="aetTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="aetLabel" runat="server" Text='<%# Bind("AET") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Porta"  ControlStyle-Width="40px">
                <EditItemTemplate>
                    <asp:TextBox ID="portTextBox" runat="server" Text='<%# Bind("Port") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="portTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="portLabel" runat="server" Text='<%# Bind("Port") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="IP primario"  ControlStyle-Width="100px">
                <EditItemTemplate>
                    <asp:TextBox ID="primaryIpTextBox" runat="server" Text='<%# Bind("PrimaryIp") %>' CssClass="inputNormal"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="primaryIpFieldValidator" runat="server" ControlToValidate="primaryIpTextBox" ErrorMessage="Inserire IP" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="primaryIpRegularExpressionValidator"
                    ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" 
                    ControlToValidate="primaryIpTextBox" runat="server" ErrorMessage="IP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="primaryIpTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="primaryIpFieldValidator" runat="server" ControlToValidate="primaryIpTextBox" ErrorMessage="Inserire IP" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="primaryIpRegularExpressionValidator"
                    ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" 
                    ControlToValidate="primaryIpTextBox" runat="server" ErrorMessage="IP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="primaryIpLabel" runat="server" Text='<%# Bind("PrimaryIp") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="IP Secondario"  ControlStyle-Width="100px">
                <EditItemTemplate>
                    <asp:TextBox ID="secondaryIpTextBox" runat="server" Text='<%# Bind("SecondaryIp") %>' CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="secondaryIpRegularExpressionValidator"
                    ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" 
                    ControlToValidate="secondaryIpTextBox" runat="server" ErrorMessage="IP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="secondaryIpTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="secondaryIpRegularExpressionValidator"
                    ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" 
                    ControlToValidate="secondaryIpTextBox" runat="server" ErrorMessage="IP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="secondaryIpLabel" runat="server" Text='<%# Bind("SecondaryIp") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Win username"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="winUsernameTextBox" runat="server" Text='<%# Bind("WinUsername") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="winUsernameTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="winUsernameLabel" runat="server" Text='<%# Bind("WinUsername") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Win password"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="winPasswordTextBox" runat="server" Text='<%# Bind("WinPassword") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="winPasswordTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="winPasswordLabel" runat="server" Text="" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Service username"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="serviceUsernameTextBox" runat="server" Text='<%# Bind("ServiceUsername") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="serviceUsernameTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="serviceUsernameLabel" runat="server" Text='<%# Bind("ServiceUsername") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Service password"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="servicePasswordTextBox" runat="server" Text='<%# Bind("ServicePassword") %>' CssClass="inputNormal" ></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="servicePasswordTextBox" runat="server" CssClass="inputNormal" ></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="servicePasswordLabel" runat="server" Text="" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="CAP"  ControlStyle-Width="40px">
                <EditItemTemplate>
                    <asp:TextBox ID="capTextBox" runat="server" Text='<%# Bind("CAP") %>' CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="capRegularExpressionValidator"
                    ValidationExpression="^[0-9]{5}$" 
                    ControlToValidate="capTextBox" runat="server" ErrorMessage="CAP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="capTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="capRegularExpressionValidator"
                    ValidationExpression="^[0-9]{5}$" 
                    ControlToValidate="capTextBox" runat="server" ErrorMessage="CAP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="capLabel" runat="server" Text='<%# Bind("CAP") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Indirizzo"  ControlStyle-Width="140px">
                <EditItemTemplate>
                    <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("Address") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="addressTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="addressLabel" runat="server" Text='<%# Bind("Address") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Note"  ControlStyle-Width="100px">
                <EditItemTemplate>
                    <asp:TextBox ID="noteTextBox" runat="server" Text='<%# Bind("Note") %>' CssClass="inputNormal"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="noteTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="noteLabel" runat="server" Text='<%# Bind("Note") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Lat"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="latTextBox" runat="server" Text='<%# Bind("Lat") %>' CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="latRegularExpressionValidator"
                    ValidationExpression="[-+]?[0-9]*\,?[0-9]+" 
                    ControlToValidate="latTextBox" runat="server" ErrorMessage="Coord. non valida" Display="Dynamic"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="latTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="latRegularExpressionValidator"
                    ValidationExpression="[-+]?[0-9]*\,?[0-9]+" 
                    ControlToValidate="latTextBox" runat="server" ErrorMessage="Coord. non valida" Display="Dynamic"></asp:RegularExpressionValidator>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="latLabel" runat="server" Text='<%# Bind("Lat") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Lon"  ControlStyle-Width="80px">
                <EditItemTemplate>
                    <asp:TextBox ID="lonTextBox" runat="server" Text='<%# Bind("Lon") %>' CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="lonRegularExpressionValidator"
                    ValidationExpression="[-+]?[0-9]*\,?[0-9]+" 
                    ControlToValidate="lonTextBox" runat="server" ErrorMessage="Coord. non valida" Display="Dynamic"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="lonTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="lonRegularExpressionValidator"
                    ValidationExpression="[-+]?[0-9]*\,?[0-9]+" 
                    ControlToValidate="lonTextBox" runat="server" ErrorMessage="Coord. non valida" Display="Dynamic"></asp:RegularExpressionValidator>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="lonLabel" runat="server" Text='<%# Bind("Lon") %>' CssClass="EtichettaLightNotCapitalize"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle CssClass="GridView_FooterStyle" />
        <HeaderStyle CssClass="GridView_HeaderStyle" />
        <PagerStyle CssClass="GridView_PagerStyle" />
        <RowStyle CssClass="GridView_RowStyle" />
        <EmptyDataTemplate>
            <table style="width: 100%;">
                <tr>
                    <td>
                        
                    </td>
                    <td>
                        <asp:Label ID="hostLabel" runat="server" Text="Host" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="descriptionLabel" runat="server" Text="Descrizione host" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="hospitalLabel" runat="server" Text="Ospedale" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="hostTypesLabel" runat="server" Text="Tipo host" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="providerLabel" runat="server" Text="Provider" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="aetLabel" runat="server" Text="AET" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="portLabel" runat="server" Text="Porta" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="primaryIpLabel" runat="server" Text="IP primario" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="secondaryIpLabel" runat="server" Text="IP Secondario" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="winUsernameLabel" runat="server" Text="Win username" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="winPasswordLabel" runat="server" Text="Win password" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="serviceUsernameLabel" runat="server" Text="Service username" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="servicePasswordLabel" runat="server" Text="Service password" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="capLabel" runat="server" Text="CAP" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="addressLabel" runat="server" Text="Indirizzo" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="noteLabel" runat="server" Text="Note" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="latLabel" runat="server" Text="Lat" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lonLabel" runat="server" Text="Lon" CssClass="EtichettaLightNotCapitalize"></asp:Label>
                    </td>
                </tr>

                <tr>
                    <td>
                        <asp:Button ID="emptySaveButton" CommandName="emptySaveButton" runat="server" Text="Salva" CssClass="Button" />
                    </td>
                    <td>
                        <asp:TextBox ID="hostTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="hostRequiredFieldValidator" runat="server" ControlToValidate="hostTextBox" ErrorMessage="Inserire host" Display="Dynamic"></asp:RequiredFieldValidator>

                    </td>
                    <td>
                        <asp:TextBox ID="descriptionTextBox" runat="server"  CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:DropDownList ID="hospitalsEmptyDropDownList" runat="server" 
                            DataSourceID="hospitalsEmptyObjectDataSource" DataTextField="description" 
                            DataValueField="GUID" CssClass="ddmBox">
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="hospitalsEmptyObjectDataSource" runat="server" 
                            SelectMethod="getAllHospitalsForInstallation" 
                            TypeName="IrendilDLL.PageControls.ConfigurationControl"></asp:ObjectDataSource>
                    </td>
                    <td>
                        <asp:DropDownList ID="hostTypesEmptyDropDownList" runat="server" 
                                    DataSourceID="hostTypesEmptyObjectDataSource" DataTextField="HostType" 
                                    DataValueField="GUID" CssClass="ddmBox">
                                </asp:DropDownList>
                                <asp:ObjectDataSource ID="hostTypesEmptyObjectDataSource" runat="server" 
                                    SelectMethod="getAllHostTypes" 
                                    TypeName="IrendilDLL.PageControls.ConfigurationControl"></asp:ObjectDataSource>
                    </td>
                    <td>
                        <asp:TextBox ID="providerTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="aetTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="portTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="primaryIpTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="primaryIpFieldValidator" runat="server" ControlToValidate="primaryIpTextBox" ErrorMessage="Inserire IP" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="primaryIpRegularExpressionValidator"
                                ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" 
                                ControlToValidate="primaryIpTextBox" runat="server" ErrorMessage="IP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                    <td>
                        <asp:TextBox ID="secondaryIpTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="secondaryIpRegularExpressionValidator"
                                ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" 
                                ControlToValidate="secondaryIpTextBox" runat="server" ErrorMessage="IP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                    <td>
                        <asp:TextBox ID="winUsernameTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="winPasswordTextBox" runat="server" CssClass="inputNormal" ></asp:TextBox>
                    </td>

                    <td>
                        <asp:TextBox ID="serviceUsernameTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="servicePasswordTextBox" runat="server" CssClass="inputNormal" ></asp:TextBox>
                    </td>

                    <td>
                        <asp:TextBox ID="capTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="capRegularExpressionValidator"
                        ValidationExpression="^[0-9]{5}$" 
                        ControlToValidate="capTextBox" runat="server" ErrorMessage="CAP non valido" Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                    <td>
                        <asp:TextBox ID="addressTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="noteTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="latTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="latRegularExpressionValidator"
                        ValidationExpression="[-+]?[0-9]*\,?[0-9]+" 
                        ControlToValidate="latTextBox" runat="server" ErrorMessage="Coord. non valida" Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                    <td>
                        <asp:TextBox ID="lonTextBox" runat="server" CssClass="inputNormal"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="lonRegularExpressionValidator"
                        ValidationExpression="[-+]?[0-9]*\,?[0-9]+" 
                        ControlToValidate="lonTextBox" runat="server" ErrorMessage="Coord. non valida" Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                

            </table>

            
        </EmptyDataTemplate>
    </asp:GridView>
    
    <asp:ObjectDataSource ID="ObjectDataSource" runat="server" 
        SelectMethod="getAllHostsForInstallation" 
        TypeName="IrendilDLL.PageControls.ConfigurationControl" 
        UpdateMethod="updateHost" DeleteMethod="deleteHost" 
        InsertMethod="insertHost">
        <InsertParameters>
            <asp:Parameter Name="Guid" Type="String" />
            <asp:Parameter Name="Host" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="GUIDHospital" Type="String" />
            <asp:Parameter Name="GUIDHostType" Type="String" />
            <asp:Parameter Name="Provider" Type="String" />
            <asp:Parameter Name="AET" Type="String" />
            <asp:Parameter Name="Port" Type="String" />
            <asp:Parameter Name="PrimaryIp" Type="String" />
            <asp:Parameter Name="SecondaryIp" Type="String" />
            <asp:Parameter Name="WinUsername" Type="String" />
            <asp:Parameter Name="WinPassword" Type="String" />
            <asp:Parameter Name="ServiceUsername" Type="String" />
            <asp:Parameter Name="ServicePassword" Type="String" />
            <asp:Parameter Name="CAP" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="Note" Type="String" />
            <asp:Parameter Name="Lat" Type="String" />
            <asp:Parameter Name="Lon" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter DbType="Guid" Name="Guid" />
            <asp:Parameter Name="Host" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="GUIDHospital" Type="String" />
            <asp:Parameter Name="GUIDHostType" Type="String" />
            <asp:Parameter Name="Provider" Type="String" />
            <asp:Parameter Name="AET" Type="String" />
            <asp:Parameter Name="Port" Type="String" />
            <asp:Parameter Name="PrimaryIp" Type="String" />
            <asp:Parameter Name="SecondaryIp" Type="String" />
            <asp:Parameter Name="WinUsername" Type="String" />
            <asp:Parameter Name="WinPassword" Type="String" />
            <asp:Parameter Name="ServiceUsername" Type="String" />
            <asp:Parameter Name="ServicePassword" Type="String" />
            <asp:Parameter Name="CAP" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="Note" Type="String" />
            <asp:Parameter Name="Lat" Type="String" />
            <asp:Parameter Name="Lon" Type="String" />
        </UpdateParameters>
    </asp:ObjectDataSource>

    </asp:Content>
